import request from '@/utils/request'

// 查询产品规格列表
export function listSpecification(query) {
  return request({
    url: '/md/specification/list',
    method: 'get',
    params: query
  })
}

// 查询产品规格详细
export function getSpecification(productSpecificationId) {
  return request({
    url: '/md/specification/' + productSpecificationId,
    method: 'get'
  })
}

// 新增产品规格
export function addSpecification(data) {
  return request({
    url: '/md/specification',
    method: 'post',
    data: data
  })
}

// 修改产品规格
export function updateSpecification(data) {
  return request({
    url: '/md/specification',
    method: 'put',
    data: data
  })
}

// 删除产品规格
export function delSpecification(productSpecificationId) {
  return request({
    url: '/md/specification/' + productSpecificationId,
    method: 'delete'
  })
}
